<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../../../assets/docs.css" rel="stylesheet" type="text/css" media="screen" />
<title>MooTools 1.3 参考文档 - Utilities/DOMReady</title>
</head>

<body>
  <div id="docs" class="doc">
    <div class="methods">
      <h4 class="menu-item"><a href="#"></a></h4>
    </div>
    <div class="l-border r-border span-15 content">
      <h1><a href="#">Window Event: domready</a></h1>
      <p class="description">Contains the window Event 'domready', which will execute when the DOM has loaded.  To ensure that DOM elements exist when the code attempting to access them is executed, they should be placed within the 'domready' event.</p>
      <p>This event is only available to the window Element.</p>
      <h3>示例: </h3>
      <pre class="javascript">window.<span class="me1">addEvent</span><span class="br0">(</span><span class="st0">'domready'</span>, <span class="kw2">function</span><span class="br0">(</span><span class="br0">)</span> <span class="br0">{</span>
    <span class="kw3">alert</span><span class="br0">(</span><span class="st0">'The DOM is ready!'</span><span class="br0">)</span>;

<span class="br0">}</span><span class="br0">)</span>;
</pre>
      <h3>另参考:</h3>
      <p><a href="../../../docs/core/Element/Element.Event.html">Element.Event</a></p>
    </div>
  </div>
<script type="text/javascript" src="../../../assets/mootools-core-1.3.js"></script>
<script type="text/javascript" src="../../../assets/mootools-more-smoothscroll.js"></script>
<script type="text/javascript" src="../../../assets/doc-assist.js"></script>
</body>
</html>
